package dongshi.daddy.main;

import dongshi.daddy.service.monitor.DubboMonitorService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class ConsumerWithMonitorMain {
    public static void main(String[] args) throws InterruptedException {
        ClassPathXmlApplicationContext context
                = new ClassPathXmlApplicationContext("consumer-with-monitor.xml");
        context.start();
        DubboMonitorService dubboMonitorService = (DubboMonitorService) context.getBean("dubboMonitorService");
        while (true) {
            System.err.println(dubboMonitorService.sayHi("jack!"));
            Thread.sleep(2000);
        }
    }

}
